import com.github.pagehelper.PageInfo;
import com.offcn.bean.User;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;


@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:spring/spring.xml")
public class UserService {
    @Autowired
    private com.offcn.service.UserService userService;

    @Test
    public void test1(){
        PageInfo<User> userPageInfo = userService.userPageInfo(1, "");
        for (User user : userPageInfo.getList()) {
            System.out.println(user);
        }
    }

    @Test
    public void test2(){
        User user = userService.getUserByUnamePwd("admin", "1234");
        System.out.println(user);
    }
}
